
export function count(state = 0, action){
    let {type, data} = action;
    switch (type) {
        case 'add':
            return state+data;
        case 'subtract':
            return state-data;
        default:
            return 0;
    }
}